import axios from 'axios';

const apiClient = axios.create({
    baseURL: 'http://localhost:8080/api', // 假设后端API前缀为/api
    withCredentials: false,
    headers: {
        Accept: 'application/json',
        'Content-Type': 'application/json'
    }
});

export default {
    getContractsByStatus(status) {
        return apiClient.get(`/contracts/status/${status}`);
    },
    getContractById(id) {
        return apiClient.get(`/contracts/${id}`);
    }
};